<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/template/template_dialog.xhtml">
<ui:define name="head">
	<link rel="stylesheet" href="/resources/plugins/datatables/dataTables.bootstrap.css" />
<style>
#accountInfo .box-header {
	padding: 19px;
}

#statistics .box-title {
	font-size: 16px;
}

#vol p:nth-child(2) {
	font-size: 15px;
}

select {
	color: black;
}

.ui-autocomplete-input {
	width: 100%;
}
</style>
<title>手机端消息接收设置</title>
</ui:define>
<ui:define name="content">
	<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
		<p:commandButton value="是" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
		<p:commandButton value="否" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
	</p:confirmDialog>
	<div class="full-center-content-scroll-noheader">
		<h:form id="infoForm">
			<p:growl id="selfInfoMsgs" showDetail="true"/>
			<p:remoteCommand name="onCellEdit" update="" />
			<p:dataTable id="selfInfoTable" var="selfIn" rowKey="#{selfIn.id}" 
				value="#{mobileUserInfoController.selfInfo}" emptyMessage="暂无记录" 
				selectionMode="single" lazy="true" selection="#{mobileUserInfoController.selectMu}" 
				style="margin-bottom: 20px" editable="true" editMode="cell">
				<p:ajax event="rowSelect" listener="#{mobileUserInfoController.onRowSelect}"/>
				<p:ajax event="cellEdit" oncomplete="onCellEdit()" update="infoForm:selfInfoMsgs selfInfoTable" listener="#{mobileUserInfoController.editSelfInfo}" />
				<p:column headerText="用户姓名">
					<p:cellEditor>
						<f:facet name="output">
							<h:outputText value="#{selfIn.realName}" />
						</f:facet>
						<f:facet name="input">
							<p:inputText value="#{selfIn.realName}" />
						</f:facet>
					</p:cellEditor>
				</p:column>
				<p:column headerText="4A账号">
					<p:cellEditor>
						<f:facet name="output">
							<h:outputText value="#{selfIn.account}" />
						</f:facet>
						<f:facet name="input">
							<p:inputText value="#{selfIn.account}" />
						</f:facet>
					</p:cellEditor>
				</p:column>
				<p:column headerText="移动设备id">
					<p:cellEditor>
						<f:facet name="output">
							<h:outputText value="#{selfIn.clientid}" />
						</f:facet>
						<f:facet name="input">
							<p:inputText value="#{selfIn.clientid}" />
						</f:facet>
					</p:cellEditor>
				</p:column>
				<p:column headerText="移动设备esn">
					<p:cellEditor>
						<f:facet name="output">
							<h:outputText value="#{selfIn.esn}" />
						</f:facet>
						<f:facet name="input">
							<p:inputText value="#{selfIn.esn}" />
						</f:facet>
					</p:cellEditor>
				</p:column>
				<p:column headerText="是否接收推送消息">
					<p:selectBooleanCheckbox value="#{selfIn.receiveFlag}" >
						<p:ajax update="infoForm:selfInfoMsgs selfInfoTable" listener="#{mobileUserInfoController.editUserFlag(selfIn)}" />
					</p:selectBooleanCheckbox>
				</p:column>
				<p:column headerText="创建时间 ">
					<h:outputText value="#{selfIn.createTime}" />
				</p:column>
			</p:dataTable>
		</h:form>
	</div>
</ui:define>
</ui:composition>